﻿$(function () {
    $("#btnLogin").click(function () {
        var userName = $("#userName").val();
        var password = $("#password").val();
        var emsgObj = $(".errmsg");
        if ($.trim(userName) == "") {
            emsgObj.text("请输入用户名！");
            $("#userName").focus();
            return false;
        }
        else if ($.trim(password) == "") {
            emsgObj.text("请输入密码！");
            $("#password").focus();
            return false;
        }
    });
});